package com.cpos.orderserver.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

/*
*   订单接口
* */
@FeignClient("order-service")
public interface OrderService {

    /*
    *   修改商品库存
    * */
    @RequestMapping(value = "/reduceStock/{goodId}",method = RequestMethod.PUT)
    @ResponseBody
    public List<Map<Object,Object>> OrderToStock(@PathVariable("goodId") String goodId);
}
